When an oil control valve, which performs hydraulic oil pressure supply and discharge control for a variable valve mechanism in an internal combustion engine, is incorporated in the cylinder head, the oil control valve may be mounted on a head cover to facilitate the attachment and detachment of the oil control valve. In this case, if the head cover has a dimensional error or if the head cover is deformed when attached to the cylinder head, displacement between the oil control valve and a hydraulic oil supply-discharge passage of the cylinder head may cause the oil seal to deteriorate.
To prevent such deterioration in the oil seal, a structure for attaching an oil control valve to a cam cap and exposing a connector, which is electrically connected to a solenoid of the oil control valve, through a hole extending through the head cover has been proposed (refer to, for example, patent document 1).
An attachment leg for fixing the oil control valve to the cam cap is fixed to the cam cap in the structure of patent document 1. Thus, when replacing the oil control valve, the attachment leg must be loosened after removing the head cover. Such replacement work is complicated.
There is a demand for easier replacement of not only the oil control valve but also other functional devices for an internal combustion engine such as sensor.    Patent Document 1: International Publication No. WO2002/046583